﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class TempOdGiDummyViewport : OdGiViewport
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public TempOdGiDummyViewport(IntPtr cPtr, bool cMemoryOwn) : base(GlobalsPINVOKE.TempOdGiDummyViewport_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(TempOdGiDummyViewport obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.deletePD_TempOdGiDummyViewport(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new virtual OdGeMatrix3d getModelToEyeTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.TempOdGiDummyViewport_getModelToEyeTransform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeMatrix3d getEyeToModelTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.TempOdGiDummyViewport_getEyeToModelTransform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeMatrix3d getWorldToEyeTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.TempOdGiDummyViewport_getWorldToEyeTransform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeMatrix3d getEyeToWorldTransform()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.TempOdGiDummyViewport_getEyeToWorldTransform(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool isPerspective()
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyViewport_isPerspective(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool doPerspective(OdGePoint3d p)
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyViewport_doPerspective(this.swigCPtr, OdGePoint3d.getCPtr(p));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool doInversePerspective(OdGePoint3d arg0)
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyViewport_doInversePerspective(this.swigCPtr, OdGePoint3d.getCPtr(arg0));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void getNumPixelsInUnitSquare(OdGePoint3d givenWorldpt, OdGePoint2d pixelArea)
		{
			GlobalsPINVOKE.TempOdGiDummyViewport_getNumPixelsInUnitSquare__SWIG_0(this.swigCPtr, OdGePoint3d.getCPtr(givenWorldpt), OdGePoint2d.getCPtr(pixelArea));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual void getNumPixelsInUnitSquare(OdGePoint3d givenWorldpt, OdGePoint2d pixelArea, bool bUsePerspective)
		{
			GlobalsPINVOKE.TempOdGiDummyViewport_getNumPixelsInUnitSquare__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(givenWorldpt), OdGePoint2d.getCPtr(pixelArea), bUsePerspective);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdGePoint3d getCameraLocation()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.TempOdGiDummyViewport_getCameraLocation(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGePoint3d getCameraTarget()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.TempOdGiDummyViewport_getCameraTarget(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeVector3d getCameraUpVector()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.TempOdGiDummyViewport_getCameraUpVector(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGeVector3d viewDir()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.TempOdGiDummyViewport_viewDir(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual uint viewportId()
		{
			uint result = GlobalsPINVOKE.TempOdGiDummyViewport_viewportId(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual short acadWindowId()
		{
			short result = GlobalsPINVOKE.TempOdGiDummyViewport_acadWindowId(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void getViewportDcCorners(OdGePoint2d lower_left, OdGePoint2d upper_right)
		{
			GlobalsPINVOKE.TempOdGiDummyViewport_getViewportDcCorners(this.swigCPtr, OdGePoint2d.getCPtr(lower_left), OdGePoint2d.getCPtr(upper_right));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool getFrontAndBackClipValues(out bool clip_front, out bool clip_back, out double front, out double back)
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyViewport_getFrontAndBackClipValues(this.swigCPtr, out clip_front, out clip_back, out front, out back);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual double linetypeScaleMultiplier()
		{
			double result = GlobalsPINVOKE.TempOdGiDummyViewport_linetypeScaleMultiplier(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual double linetypeGenerationCriteria()
		{
			double result = GlobalsPINVOKE.TempOdGiDummyViewport_linetypeGenerationCriteria(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual bool layerVisible(OdDbStub idLayer)
		{
			bool result = GlobalsPINVOKE.TempOdGiDummyViewport_layerVisible(this.swigCPtr, OdDbStub.getCPtr(idLayer));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdGiContextualColors contextualColors()
		{
			OdGiContextualColors result = (OdGiContextualColors)Teigha.Core.Helpers.odrxCreateObjectInternal(GlobalsPINVOKE.TempOdGiDummyViewport_contextualColors(this.swigCPtr), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;
	}
}
